package home.mutant.gauto.generative;

import jenes.chromosome.BitwiseChromosome.BitCoding;
import jenes.chromosome.BitwiseChromosome.BitSize;

public class SignedShortCoding extends BitCoding<Double>
{
    public SignedShortCoding() 
    {
        super(BitSize.BIT16);
    }
	@Override
	public Double decode(int bits)
	{
		return ((double)bits)/100.;
	}

	@Override
	public int encode(Double obj)
	{
		Double tmp= new Double(obj*100);
		return (tmp).intValue();
	}
}
